package com.ybkj.daijia.server.freight;

import java.util.Date;

public class Truck {

    private static final long serialVersionUID = 1L;
    private Long id;
    private Date created;
    private Date updated;
    private String name;
    private Long driverId;
    private String driverName;
    private Long truckTypeId;
    private String truckTypeName;
    private String carNumber;
    private Integer status;//0 空闲 ,1  忙碌 , 2 离线
    private String companyName;
    private Long companyId;
    private Boolean cangointotown;
    private String appKey;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Long getDriverId() {
        return driverId;
    }

    public void setDriverId(Long driverId) {
        this.driverId = driverId;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName == null ? null : driverName.trim();
    }

    public Long getTruckTypeId() {
        return truckTypeId;
    }

    public void setTruckTypeId(Long truckTypeId) {
        this.truckTypeId = truckTypeId;
    }

    public String getTruckTypeName() {
        return truckTypeName;
    }

    public void setTruckTypeName(String truckTypeName) {
        this.truckTypeName = truckTypeName == null ? null : truckTypeName.trim();
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber == null ? null : carNumber.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Boolean getCangointotown() {
        return cangointotown;
    }

    public void setCangointotown(Boolean cangointotown) {
        this.cangointotown = cangointotown;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey == null ? null : appKey.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Truck other = (Truck) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCreated() == null ? other.getCreated() == null
            : this.getCreated().equals(other.getCreated()))
            && (this.getUpdated() == null ? other.getUpdated() == null
            : this.getUpdated().equals(other.getUpdated()))
            && (this.getName() == null ? other.getName() == null
            : this.getName().equals(other.getName()))
            && (this.getDriverId() == null ? other.getDriverId() == null
            : this.getDriverId().equals(other.getDriverId()))
            && (this.getDriverName() == null ? other.getDriverName() == null
            : this.getDriverName().equals(other.getDriverName()))
            && (this.getTruckTypeId() == null ? other.getTruckTypeId() == null
            : this.getTruckTypeId().equals(other.getTruckTypeId()))
            && (this.getTruckTypeName() == null ? other.getTruckTypeName() == null
            : this.getTruckTypeName().equals(other.getTruckTypeName()))
            && (this.getCarNumber() == null ? other.getCarNumber() == null
            : this.getCarNumber().equals(other.getCarNumber()))
            && (this.getStatus() == null ? other.getStatus() == null
            : this.getStatus().equals(other.getStatus()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null
            : this.getCompanyName().equals(other.getCompanyName()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null
            : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getCangointotown() == null ? other.getCangointotown() == null
            : this.getCangointotown().equals(other.getCangointotown()))
            && (this.getAppKey() == null ? other.getAppKey() == null
            : this.getAppKey().equals(other.getAppKey()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDriverId() == null) ? 0 : getDriverId().hashCode());
        result = prime * result + ((getDriverName() == null) ? 0 : getDriverName().hashCode());
        result = prime * result + ((getTruckTypeId() == null) ? 0 : getTruckTypeId().hashCode());
        result =
            prime * result + ((getTruckTypeName() == null) ? 0 : getTruckTypeName().hashCode());
        result = prime * result + ((getCarNumber() == null) ? 0 : getCarNumber().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result =
            prime * result + ((getCangointotown() == null) ? 0 : getCangointotown().hashCode());
        result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", created=").append(created);
        sb.append(", updated=").append(updated);
        sb.append(", name=").append(name);
        sb.append(", driverId=").append(driverId);
        sb.append(", driverName=").append(driverName);
        sb.append(", truckTypeId=").append(truckTypeId);
        sb.append(", truckTypeName=").append(truckTypeName);
        sb.append(", carNumber=").append(carNumber);
        sb.append(", status=").append(status);
        sb.append(", companyName=").append(companyName);
        sb.append(", companyId=").append(companyId);
        sb.append(", cangointotown=").append(cangointotown);
        sb.append(", appKey=").append(appKey);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}